//
//  GoodsListBtn.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/7/6.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "GoodsListBtn.h"

@implementation GoodsListBtn

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    WeakSelf
    self.backgroundColor = kClearColor;
    
    self.textLB = [UILabel labelWithText:@"" textColor:UIColorFromRGB(0x323232) fontSize:15];
    [_textLB sizeToFit];
    [self addSubview:_textLB];
    [_textLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.centerX.equalTo(self).offset(-rateWidth(15));
    }];
    
    self.rightImg = [[UIImageView alloc] init];
    [_rightImg sizeToFit];
    [self addSubview:_rightImg];
    [_rightImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.textLB.mas_right).offset(rateWidth(20));
        make.centerY.equalTo(self);
    }];
    self.rightImg.userInteractionEnabled = YES;
}

@end
